package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableEurekaClient
@EnableCircuitBreaker   //允许熔断
@EnableHystrixDashboard  //开启dashboard
public class EurekaServerA {

	public static void main(String[] args) {
		SpringApplication.run(EurekaServerA.class, args);
		System.out.println("eureka-server-A");
	}
	@Bean
	public RestTemplate getRestTemplate() {
		return new RestTemplate();
	}
}
